2ce6c0
@@ -355,8 +355,8 @@
public int execute(DriverContext driverContext) {
           //upload archive file to hdfs
           Path hdfsFilePath =Utilities.generateTarPath(hdfsPath, stageId);
           short replication = (short) job.getInt("mapred.submit.replication", 10);
-          hdfs.setReplication(hdfsFilePath, replication);
           hdfs.copyFromLocalFile(archivePath, hdfsFilePath);
+          hdfs.setReplication(hdfsFilePath, replication);
           LOG.info("Upload 1 archive file  from" + archivePath + " to: " + hdfsFilePath);
 
           //add the archive file to distributed cache
